OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 393 |
394 class HangoutServicesBrowserTest : public AudioWaitingExtensionTest { | 394 class HangoutServicesBrowserTest : public AudioWaitingExtensionTest { |
395 public: | 395 public: |
396 void SetUp() override { | 396 void SetUp() override { |
397 // Make sure the Hangout Services component extension gets loaded. | 397 // Make sure the Hangout Services component extension gets loaded. |
398 ComponentLoader::EnableBackgroundExtensionsForTesting(); | 398 ComponentLoader::EnableBackgroundExtensionsForTesting(); |
399 AudioWaitingExtensionTest::SetUp(); | 399 AudioWaitingExtensionTest::SetUp(); |
400 } | 400 } |
401 }; | 401 }; |
402 | 402 |
403 #if defined(GOOGLE_CHROME_BUILD) || BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) | 403 #if BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) |
404 IN_PROC_BROWSER_TEST_F(HangoutServicesBrowserTest, | 404 IN_PROC_BROWSER_TEST_F(HangoutServicesBrowserTest, |
405 RunComponentExtensionTest) { | 405 RunComponentExtensionTest) { |
406 // This runs the end-to-end JavaScript test for the Hangout Services | 406 // This runs the end-to-end JavaScript test for the Hangout Services |
407 // component extension, which uses the webrtcAudioPrivate API among | 407 // component extension, which uses the webrtcAudioPrivate API among |
408 // others. | 408 // others. |
409 ASSERT_TRUE(StartEmbeddedTestServer()); | 409 ASSERT_TRUE(StartEmbeddedTestServer()); |
410 GURL url(embedded_test_server()->GetURL( | 410 GURL url(embedded_test_server()->GetURL( |
411 "/extensions/hangout_services_test.html")); | 411 "/extensions/hangout_services_test.html")); |
412 // The "externally connectable" extension permission doesn't seem to | 412 // The "externally connectable" extension permission doesn't seem to |
413 // like when we use 127.0.0.1 as the host, but using localhost works. | 413 // like when we use 127.0.0.1 as the host, but using localhost works. |
(...skipping 16 matching lines...) Expand all Loading... |
430 ASSERT_TRUE(content::ExecuteScript(tab, "browsertestRunAllTests();")); | 430 ASSERT_TRUE(content::ExecuteScript(tab, "browsertestRunAllTests();")); |
431 | 431 |
432 content::TitleWatcher title_watcher(tab, base::ASCIIToUTF16("success")); | 432 content::TitleWatcher title_watcher(tab, base::ASCIIToUTF16("success")); |
433 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); | 433 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); |
434 base::string16 result = title_watcher.WaitAndGetTitle(); | 434 base::string16 result = title_watcher.WaitAndGetTitle(); |
435 EXPECT_EQ(base::ASCIIToUTF16("success"), result); | 435 EXPECT_EQ(base::ASCIIToUTF16("success"), result); |
436 | 436 |
437 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( | 437 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( |
438 NULL); | 438 NULL); |
439 } | 439 } |
440 #endif // defined(GOOGLE_CHROME_BUILD) || BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXT
ENSION) | 440 #endif // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) |
441 | 441 |
442 } // namespace extensions | 442 } // namespace extensions |
OLD | NEW |