Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc

Issue 163583004: Add GYP flag to optionally enable the Hangout Services extension in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing hack to copy to outer scope. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 class HangoutServicesBrowserTest : public AudioWaitingExtensionTest { 368 class HangoutServicesBrowserTest : public AudioWaitingExtensionTest {
369 public: 369 public:
370 virtual void SetUp() OVERRIDE { 370 virtual void SetUp() OVERRIDE {
371 // Make sure the Hangout Services component extension gets loaded. 371 // Make sure the Hangout Services component extension gets loaded.
372 ComponentLoader::EnableBackgroundExtensionsForTesting(); 372 ComponentLoader::EnableBackgroundExtensionsForTesting();
373 AudioWaitingExtensionTest::SetUp(); 373 AudioWaitingExtensionTest::SetUp();
374 } 374 }
375 }; 375 };
376 376
377 #if defined(GOOGLE_CHROME_BUILD) 377 #if defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTENSION)
378 IN_PROC_BROWSER_TEST_F(HangoutServicesBrowserTest, 378 IN_PROC_BROWSER_TEST_F(HangoutServicesBrowserTest,
379 RunComponentExtensionTest) { 379 RunComponentExtensionTest) {
380 // This runs the end-to-end JavaScript test for the Hangout Services 380 // This runs the end-to-end JavaScript test for the Hangout Services
381 // component extension, which uses the webrtcAudioPrivate API among 381 // component extension, which uses the webrtcAudioPrivate API among
382 // others. 382 // others.
383 ASSERT_TRUE(StartEmbeddedTestServer()); 383 ASSERT_TRUE(StartEmbeddedTestServer());
384 GURL url(embedded_test_server()->GetURL( 384 GURL url(embedded_test_server()->GetURL(
385 "/extensions/hangout_services_test.html")); 385 "/extensions/hangout_services_test.html"));
386 // The "externally connectable" extension permission doesn't seem to 386 // The "externally connectable" extension permission doesn't seem to
387 // like when we use 127.0.0.1 as the host, but using localhost works. 387 // like when we use 127.0.0.1 as the host, but using localhost works.
(...skipping 12 matching lines...) Expand all
400 g_browser_process->webrtc_log_uploader()-> 400 g_browser_process->webrtc_log_uploader()->
401 OverrideUploadWithBufferForTesting(&dummy); 401 OverrideUploadWithBufferForTesting(&dummy);
402 402
403 ASSERT_TRUE(content::ExecuteScript(tab, "browsertestRunAllTests();")); 403 ASSERT_TRUE(content::ExecuteScript(tab, "browsertestRunAllTests();"));
404 404
405 content::TitleWatcher title_watcher(tab, base::ASCIIToUTF16("success")); 405 content::TitleWatcher title_watcher(tab, base::ASCIIToUTF16("success"));
406 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); 406 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure"));
407 base::string16 result = title_watcher.WaitAndGetTitle(); 407 base::string16 result = title_watcher.WaitAndGetTitle();
408 EXPECT_EQ(base::ASCIIToUTF16("success"), result); 408 EXPECT_EQ(base::ASCIIToUTF16("success"), result);
409 } 409 }
410 #endif // defined(GOOGLE_CHROME_BUILD) 410 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN SION)
411 411
412 } // namespace extensions 412 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698