Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "chrome/browser/extensions/component_loader.h" | 8 #include "chrome/browser/extensions/component_loader.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
| 15 #include "content/public/browser/browser_plugin_guest_manager.h" | 15 #include "content/public/browser/browser_plugin_guest_manager.h" |
| 16 #include "content/public/browser/plugin_service.h" | 16 #include "content/public/browser/plugin_service.h" |
| 17 #include "content/public/test/browser_test_utils.h" | 17 #include "content/public/test/browser_test_utils.h" |
| 18 #include "extensions/browser/extension_registry.h" | 18 #include "extensions/browser/extension_registry.h" |
| 19 #include "extensions/common/manifest_handlers/mime_types_handler.h" | 19 #include "extensions/common/manifest_handlers/mime_types_handler.h" |
| 20 #include "extensions/test/result_catcher.h" | 20 #include "extensions/test/result_catcher.h" |
| 21 #include "grit/browser_resources.h" | 21 #include "grit/browser_resources.h" |
| 22 #include "net/test/embedded_test_server/embedded_test_server.h" | 22 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 23 | 23 |
| 24 class PDFExtensionTest : public ExtensionApiTest { | 24 class PDFExtensionTest : public ExtensionApiTest { |
| 25 public: | 25 public: |
| 26 ~PDFExtensionTest() override {} | 26 ~PDFExtensionTest() override {} |
| 27 | 27 |
| 28 void SetUpCommandLine(base::CommandLine* command_line) override { | 28 void SetUpCommandLine(base::CommandLine* command_line) override { |
|
Sam McNally
2015/05/05 01:22:31
Remove.
raymes
2015/05/05 01:26:19
Done.
| |
| 29 ExtensionApiTest::SetUpCommandLine(command_line); | 29 ExtensionApiTest::SetUpCommandLine(command_line); |
| 30 command_line->AppendSwitch(switches::kEnableOutOfProcessPdf); | |
| 31 } | 30 } |
| 32 | 31 |
| 33 void SetUpOnMainThread() override { | 32 void SetUpOnMainThread() override { |
| 34 ExtensionApiTest::SetUpOnMainThread(); | 33 ExtensionApiTest::SetUpOnMainThread(); |
| 35 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 34 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 36 } | 35 } |
| 37 | 36 |
| 38 void TearDownOnMainThread() override { | 37 void TearDownOnMainThread() override { |
| 39 ASSERT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); | 38 ASSERT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); |
| 40 ExtensionApiTest::TearDownOnMainThread(); | 39 ExtensionApiTest::TearDownOnMainThread(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 RunTestsInFile("navigator_test.js", "test.pdf"); | 93 RunTestsInFile("navigator_test.js", "test.pdf"); |
| 95 } | 94 } |
| 96 | 95 |
| 97 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) { | 96 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ParamsParser) { |
| 98 RunTestsInFile("params_parser_test.js", "test.pdf"); | 97 RunTestsInFile("params_parser_test.js", "test.pdf"); |
| 99 } | 98 } |
| 100 | 99 |
| 101 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) { | 100 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, ZoomManager) { |
| 102 RunTestsInFile("zoom_manager_test.js", "test.pdf"); | 101 RunTestsInFile("zoom_manager_test.js", "test.pdf"); |
| 103 } | 102 } |
| OLD | NEW |