Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(994)

Unified Diff: webkit/tools/test_shell/plugin_tests.cc

Issue 72004: Relanding the following revisions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webframeloaderclient_impl.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/plugin_tests.cc
===================================================================
--- webkit/tools/test_shell/plugin_tests.cc (revision 13602)
+++ webkit/tools/test_shell/plugin_tests.cc (working copy)
@@ -95,3 +95,31 @@
DeleteTestPlugin();
}
+
+TEST_F(PluginTest, DefaultPluginLoadTest) {
+ std::string html = "\
+ <div id='result'>Test running....</div>\
+ <script>\
+ function onSuccess() {\
+ var result = document.getElementById('result');\
+ result.innerHTML = 'DONE';\
+ }\
+ </script>\
+ <DIV ID=PluginDiv>\
+ <object classid=\"clsid:9E8BC6CE-AF35-400c-ABF6-A3F746A1871D\">\
+ <embed type=\"application/chromium-test-default-plugin\"\
+ mode=\"np_embed\"\
+ ></embed>\
+ </object>\
+ </DIV>\
+ ";
+
+ test_shell_->webView()->GetMainFrame()->LoadHTMLString(
+ html, GURL("about:blank"));
+ test_shell_->WaitTestFinished();
+
+ std::wstring text;
+ test_shell_->webView()->GetMainFrame()->GetContentAsPlainText(10000, &text);
+
+ ASSERT_EQ(true, StartsWith(text, L"DONE", true));
+}
« no previous file with comments | « webkit/glue/webframeloaderclient_impl.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698