15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)#include "base/bind.h"
64e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#include "base/test/launcher/unit_test_launcher.h"
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "content/public/test/unittest_test_suite.h"
84e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#include "content/test/content_test_suite.h"
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1027bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu#if defined(OS_ANDROID)
1127bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
1227bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu#endif
1327bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)int main(int argc, char** argv) {
1527bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu#if defined(OS_ANDROID)
1627bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu  // Android wants to call GetChannelId() (even though GPU channels
1727bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu  // are not getting created in content_unittests).
1827bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu  content::BrowserGpuChannelHostFactory::Initialize(false);
1927bf38b1f54481a4168f6630e5b71bed9dd803c6Hui Shu#endif
2058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  content::UnitTestTestSuite test_suite(
2158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)      new content::ContentTestSuite(argc, argv));
2258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
2358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  return base::LaunchUnitTests(
2458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)      argc, argv, base::Bind(&content::UnitTestTestSuite::Run,
2558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)                             base::Unretained(&test_suite)));
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
27