| 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/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/tab_helper.h" | 9 #include "chrome/browser/extensions/tab_helper.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class TabCaptureApiTest : public ExtensionApiTest { | 34 class TabCaptureApiTest : public ExtensionApiTest { |
| 35 public: | 35 public: |
| 36 void AddExtensionToCommandLineWhitelist() { | 36 void AddExtensionToCommandLineWhitelist() { |
| 37 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 37 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 38 switches::kWhitelistedExtensionID, kExtensionId); | 38 switches::kWhitelistedExtensionID, kExtensionId); |
| 39 } | 39 } |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 class TabCaptureApiPixelTest : public TabCaptureApiTest { | 42 class TabCaptureApiPixelTest : public TabCaptureApiTest { |
| 43 public: | 43 public: |
| 44 virtual void SetUp() OVERRIDE { | 44 virtual void SetUp() override { |
| 45 EnablePixelOutput(); | 45 EnablePixelOutput(); |
| 46 TabCaptureApiTest::SetUp(); | 46 TabCaptureApiTest::SetUp(); |
| 47 } | 47 } |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ApiTests) { | 50 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, ApiTests) { |
| 51 #if defined(OS_WIN) && defined(USE_ASH) | 51 #if defined(OS_WIN) && defined(USE_ASH) |
| 52 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 52 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| 53 if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kAshBrowserTests)) | 53 if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kAshBrowserTests)) |
| 54 return; | 54 return; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 #endif | 284 #endif |
| 285 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_Constraints) { | 285 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_Constraints) { |
| 286 AddExtensionToCommandLineWhitelist(); | 286 AddExtensionToCommandLineWhitelist(); |
| 287 ASSERT_TRUE(RunExtensionSubtest("tab_capture", "constraints.html")) | 287 ASSERT_TRUE(RunExtensionSubtest("tab_capture", "constraints.html")) |
| 288 << message_; | 288 << message_; |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace | 291 } // namespace |
| 292 | 292 |
| 293 } // namespace extensions | 293 } // namespace extensions |
| OLD | NEW |