diff options
author | sammc <sammc@chromium.org> | 2015-01-27 20:16:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-28 04:17:46 +0000 |
commit | 36a8048b97fd720153b0474bac36a8a3387f6d8f (patch) | |
tree | f0839b48ec5cee8c51db7152fd0b301aa1b5bcd4 /extensions/renderer/guest_view | |
parent | 1c789d2840025520a22296fb05cfe336726af87c (diff) | |
download | chromium_src-36a8048b97fd720153b0474bac36a8a3387f6d8f.zip chromium_src-36a8048b97fd720153b0474bac36a8a3387f6d8f.tar.gz chromium_src-36a8048b97fd720153b0474bac36a8a3387f6d8f.tar.bz2 |
Add a test for mime handler view iframes and make them work on Windows.
Review URL: https://codereview.chromium.org/878773002
Cr-Commit-Position: refs/heads/master@{#313436}
Diffstat (limited to 'extensions/renderer/guest_view')
-rw-r--r-- | extensions/renderer/guest_view/mime_handler_view/mime_handler_view_browsertest.cc | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_browsertest.cc b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_browsertest.cc deleted file mode 100644 index d4c33d6..0000000 --- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_browsertest.cc +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/base_paths.h" -#include "base/files/file_util.h" -#include "base/path_service.h" -#include "chrome/browser/extensions/extension_apitest.h" -#include "chrome/test/base/ui_test_utils.h" -#include "content/public/test/browser_test_utils.h" -#include "extensions/browser/extension_registry.h" -#include "extensions/test/result_catcher.h" - -// The test extension id is set by the key value in the manifest. -const char* kExtensionId = "oickdpebdnfbgkcaoklfcdhjniefkcji"; - -class MimeHandlerViewTest : public ExtensionApiTest { - public: - ~MimeHandlerViewTest() override {} - - const extensions::Extension* LoadTestExtension() { - const extensions::Extension* extension = LoadExtension( - test_data_dir_.AppendASCII("mime_handler_view")); - if (!extension) - return nullptr; - - CHECK_EQ(std::string(kExtensionId), extension->id()); - - return extension; - } - - void RunTest(const std::string& path) { - const extensions::Extension* extension = LoadTestExtension(); - ASSERT_TRUE(extension); - - extensions::ResultCatcher catcher; - - GURL extension_url("chrome-extension://" + std::string(kExtensionId) + "/" + - path); - ui_test_utils::NavigateToURL(browser(), extension_url); - - if (!catcher.GetNextResult()) - FAIL() << catcher.message(); - } -}; - -// Not working on Windows because of crbug.com/443466. -#if defined(OS_WIN) -#define MAYBE_PostMessage DISABLED_PostMessage -#define MAYBE_Basic DISABLED_Basic -#define MAYBE_Embedded DISABLED_Embedded -#define MAYBE_Abort DISABLED_Abort -#else -#define MAYBE_PostMessage PostMessage -#define MAYBE_Basic Basic -#define MAYBE_Embedded Embedded -#define MAYBE_Abort Abort -#endif - -IN_PROC_BROWSER_TEST_F(MimeHandlerViewTest, MAYBE_PostMessage) { - RunTest("test_postmessage.html"); -} - -IN_PROC_BROWSER_TEST_F(MimeHandlerViewTest, MAYBE_Basic) { - RunTest("testBasic.csv"); -} - -IN_PROC_BROWSER_TEST_F(MimeHandlerViewTest, MAYBE_Embedded) { - RunTest("test_embedded.html"); -} - -IN_PROC_BROWSER_TEST_F(MimeHandlerViewTest, MAYBE_Abort) { - RunTest("testAbort.csv"); -} |