OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 const char kExtensionId[] = "ddchlicdkolnonkihahngkmmmjnjlkkf"; | 35 const char kExtensionId[] = "ddchlicdkolnonkihahngkmmmjnjlkkf"; |
36 | 36 |
37 class TabCaptureApiTest : public ExtensionApiTest { | 37 class TabCaptureApiTest : public ExtensionApiTest { |
38 public: | 38 public: |
39 void SetUpCommandLine(base::CommandLine* command_line) override { | 39 void SetUpCommandLine(base::CommandLine* command_line) override { |
40 ExtensionApiTest::SetUpCommandLine(command_line); | 40 ExtensionApiTest::SetUpCommandLine(command_line); |
41 // Specify smallish window size to make testing of tab capture less CPU | 41 // Specify smallish window size to make testing of tab capture less CPU |
42 // intensive. | 42 // intensive. |
43 command_line->AppendSwitchASCII(::switches::kWindowSize, "300,300"); | 43 command_line->AppendSwitchASCII(::switches::kWindowSize, "300,300"); |
| 44 command_line->AppendSwitch(::switches::kEnableTabAudioMuting); |
44 } | 45 } |
45 | 46 |
46 void AddExtensionToCommandLineWhitelist() { | 47 void AddExtensionToCommandLineWhitelist() { |
47 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 48 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
48 switches::kWhitelistedExtensionID, kExtensionId); | 49 switches::kWhitelistedExtensionID, kExtensionId); |
49 } | 50 } |
50 | 51 |
51 protected: | 52 protected: |
52 void SimulateMouseClickInCurrentTab() { | 53 void SimulateMouseClickInCurrentTab() { |
53 content::SimulateMouseClick( | 54 content::SimulateMouseClick( |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 return; | 355 return; |
355 } | 356 } |
356 content::RunMessageLoop(); | 357 content::RunMessageLoop(); |
357 } | 358 } |
358 browser()->tab_strip_model()->RemoveObserver(&observer); | 359 browser()->tab_strip_model()->RemoveObserver(&observer); |
359 } | 360 } |
360 | 361 |
361 } // namespace | 362 } // namespace |
362 | 363 |
363 } // namespace extensions | 364 } // namespace extensions |
OLD | NEW |