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

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

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Split out custom changes to thread_watcher_unittest.cc Created 4 years, 6 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool* audio_playing, 71 bool* audio_playing,
72 const RenderProcessHost::AudioOutputControllerList& list) { 72 const RenderProcessHost::AudioOutputControllerList& list) {
73 if (!list.empty()) 73 if (!list.empty())
74 *audio_playing = true; 74 *audio_playing = true;
75 } 75 }
76 }; 76 };
77 77
78 class WebrtcAudioPrivateTest : public AudioWaitingExtensionTest { 78 class WebrtcAudioPrivateTest : public AudioWaitingExtensionTest {
79 public: 79 public:
80 WebrtcAudioPrivateTest() 80 WebrtcAudioPrivateTest()
81 : enumeration_event_(false, false) { 81 : enumeration_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
82 } 82 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
83 83
84 void SetUpOnMainThread() override { 84 void SetUpOnMainThread() override {
85 AudioWaitingExtensionTest::SetUpOnMainThread(); 85 AudioWaitingExtensionTest::SetUpOnMainThread();
86 // Needs to happen after chrome's schemes are added. 86 // Needs to happen after chrome's schemes are added.
87 source_url_ = GURL("chrome-extension://fakeid012345678/fakepage.html"); 87 source_url_ = GURL("chrome-extension://fakeid012345678/fakepage.html");
88 } 88 }
89 89
90 protected: 90 protected:
91 void AppendTabIdToRequestInfo(base::ListValue* params, int tab_id) { 91 void AppendTabIdToRequestInfo(base::ListValue* params, int tab_id) {
92 base::DictionaryValue* request_info = new base::DictionaryValue(); 92 base::DictionaryValue* request_info = new base::DictionaryValue();
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); 426 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure"));
427 base::string16 result = title_watcher.WaitAndGetTitle(); 427 base::string16 result = title_watcher.WaitAndGetTitle();
428 EXPECT_EQ(base::ASCIIToUTF16("success"), result); 428 EXPECT_EQ(base::ASCIIToUTF16("success"), result);
429 429
430 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( 430 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting(
431 NULL); 431 NULL);
432 } 432 }
433 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN SION) 433 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN SION)
434 434
435 } // namespace extensions 435 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698