summaryrefslogtreecommitdiffstats
path: root/chrome/test/render_view_test.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 07:07:18 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 07:07:18 +0000
commit1b6cdc850d7eb2b4a19f5a51dca2ad57c9a9622f (patch)
tree2a26d85ad15485ccf6a7e48c1def21803e9710a2 /chrome/test/render_view_test.cc
parent83c249924ea14cc9b9c6628c2e93a5d09c474c75 (diff)
downloadchromium_src-1b6cdc850d7eb2b4a19f5a51dca2ad57c9a9622f.zip
chromium_src-1b6cdc850d7eb2b4a19f5a51dca2ad57c9a9622f.tar.gz
chromium_src-1b6cdc850d7eb2b4a19f5a51dca2ad57c9a9622f.tar.bz2
Revert "Add JsonSchema-based validation for the tab APIs."
This reverts commit 4f47758f5238f2e5b05d9de18f390bfe2aeb6980. Revert "TBR: Fix unit tests, line endings." This reverts commit 257fa01e20c46c68dce1c5992b75c64686cb1a66. Review URL: http://codereview.chromium.org/67122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13652 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/render_view_test.cc')
-rw-r--r--chrome/test/render_view_test.cc89
1 files changed, 0 insertions, 89 deletions
diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc
deleted file mode 100644
index 49d4c63..0000000
--- a/chrome/test/render_view_test.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2009 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 "chrome/test/render_view_test.h"
-
-#include "chrome/common/render_messages.h"
-#include "chrome/browser/extensions/extension_function_dispatcher.h"
-#include "chrome/renderer/extensions/event_bindings.h"
-#include "chrome/renderer/extensions/extension_process_bindings.h"
-#include "chrome/renderer/extensions/renderer_extension_bindings.h"
-#include "chrome/renderer/js_only_v8_extensions.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
-#include "webkit/glue/weburlrequest.h"
-#include "webkit/glue/webview.h"
-
-using WebKit::WebScriptSource;
-using WebKit::WebString;
-
-namespace {
-
-const int32 kRouteId = 5;
-const int32 kOpenerId = 7;
-
-};
-
-void RenderViewTest::ProcessPendingMessages() {
- msg_loop_.PostTask(FROM_HERE, new MessageLoop::QuitTask());
- msg_loop_.Run();
-}
-
-WebFrame* RenderViewTest::GetMainFrame() {
- return view_->webview()->GetMainFrame();
-}
-
-void RenderViewTest::ExecuteJavaScript(const char* js) {
- GetMainFrame()->ExecuteScript(WebScriptSource(WebString::fromUTF8(js)));
-}
-
-void RenderViewTest::LoadHTML(const char* html) {
- std::string url_str = "data:text/html;charset=utf-8,";
- url_str.append(html);
- GURL url(url_str);
-
- scoped_ptr<WebRequest> request(WebRequest::Create(url));
- GetMainFrame()->LoadRequest(request.get());
-
- // The load actually happens asynchronously, so we pump messages to process
- // the pending continuation.
- ProcessPendingMessages();
-}
-
-void RenderViewTest::SetUp() {
- WebKit::initialize(&webkitclient_);
- WebKit::registerExtension(BaseJsV8Extension::Get());
- WebKit::registerExtension(JsonJsV8Extension::Get());
- WebKit::registerExtension(JsonSchemaJsV8Extension::Get());
- WebKit::registerExtension(EventBindings::Get());
- WebKit::registerExtension(ExtensionProcessBindings::Get());
- WebKit::registerExtension(RendererExtensionBindings::Get(&render_thread_));
-
- // TODO(aa): Should some of this go to some other inheriting class?
- std::vector<std::string> names;
- ExtensionFunctionDispatcher::GetAllFunctionNames(&names);
- ExtensionProcessBindings::SetFunctionNames(names);
-
- mock_process_.reset(new MockProcess());
-
- render_thread_.set_routing_id(kRouteId);
-
- // This needs to pass the mock render thread to the view.
- view_ = RenderView::Create(&render_thread_, NULL, NULL, kOpenerId,
- WebPreferences(),
- new SharedRenderViewCounter(0), kRouteId);
-}
-void RenderViewTest::TearDown() {
- render_thread_.SendCloseMessage();
-
- // Run the loop so the release task from the renderwidget executes.
- ProcessPendingMessages();
-
- view_ = NULL;
-
- mock_process_.reset();
- WebKit::shutdown();
-
- msg_loop_.RunAllPending();
-}