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

Side by Side Diff: content/browser/webrtc/webrtc_getusermedia_browsertest.cc

Issue 2648173005: Add missing permission for webview tests (Closed)
Patch Set: Fixes MediaAccessPermissionRequestTest#testGrantAccess Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 large_value, 573 large_value,
574 large_value, 574 large_value,
575 large_value, 575 large_value,
576 large_value); 576 large_value);
577 NavigateToURL(shell(), url); 577 NavigateToURL(shell(), url);
578 578
579 EXPECT_EQ("ConstraintNotSatisfiedError", 579 EXPECT_EQ("ConstraintNotSatisfiedError",
580 ExecuteJavascriptAndReturnResult(call)); 580 ExecuteJavascriptAndReturnResult(call));
581 } 581 }
582 582
583 #if defined(OS_ANDROID)
584 // Disabled until http://crbug.com/679302 is fixed.
585 #define MAYBE_GetUserMediaFailToAccessAudioDevice \
586 DISABLED_GetUserMediaFailToAccessAudioDevice
587 #else
588 #define MAYBE_GetUserMediaFailToAccessAudioDevice \
589 GetUserMediaFailToAccessAudioDevice
590 #endif
591 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, 583 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
592 MAYBE_GetUserMediaFailToAccessAudioDevice) { 584 GetUserMediaFailToAccessAudioDevice) {
593 ASSERT_TRUE(embedded_test_server()->Start()); 585 ASSERT_TRUE(embedded_test_server()->Start());
594 586
595 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); 587 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
596 NavigateToURL(shell(), url); 588 NavigateToURL(shell(), url);
597 589
598 // Set the maximum allowed input and output streams to 0 590 // Set the maximum allowed input and output streams to 0
599 // so that the call to create a new audio input stream will fail. 591 // so that the call to create a new audio input stream will fail.
600 media::AudioManager::Get()->SetMaxStreamCountForTesting(0, 0); 592 media::AudioManager::Get()->SetMaxStreamCountForTesting(0, 0);
601 593
602 const std::string call = base::StringPrintf( 594 const std::string call = base::StringPrintf(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 base::Bind(&VerifyDisableLocalEcho, true)); 775 base::Bind(&VerifyDisableLocalEcho, true));
784 call = GenerateGetUserMediaWithDisableLocalEcho( 776 call = GenerateGetUserMediaWithDisableLocalEcho(
785 "getUserMediaAndExpectSuccess", "true"); 777 "getUserMediaAndExpectSuccess", "true");
786 ExecuteJavascriptAndWaitForOk(call); 778 ExecuteJavascriptAndWaitForOk(call);
787 779
788 manager->SetGenerateStreamCallbackForTesting( 780 manager->SetGenerateStreamCallbackForTesting(
789 MediaStreamManager::GenerateStreamTestCallback()); 781 MediaStreamManager::GenerateStreamTestCallback());
790 } 782 }
791 783
792 } // namespace content 784 } // namespace content
OLDNEW
« no previous file with comments | « android_webview/test/shell/AndroidManifest.xml ('k') | content/renderer/media/user_media_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698