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

Side by Side Diff: chrome/browser/default_plugin_uitest.cc

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/file_path.h" 6 #include "base/file_path.h"
7 #include "base/utf_string_conversions.h"
7 #include "build/build_config.h" 8 #include "build/build_config.h"
8 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/ui/ui_test.h" 10 #include "chrome/test/ui/ui_test.h"
10 #include "net/base/net_util.h" 11 #include "net/base/net_util.h"
11 12
12 class DefaultPluginUITest : public UITest { 13 class DefaultPluginUITest : public UITest {
13 public: 14 public:
14 DefaultPluginUITest() { 15 DefaultPluginUITest() {
15 dom_automation_enabled_ = true; 16 dom_automation_enabled_ = true;
16 } 17 }
17 }; 18 };
18 19
19 #if defined(OS_WIN) 20 #if defined(OS_WIN)
20 #define MAYBE_DefaultPluginLoadTest DISABLED_DefaultPluginLoadTest 21 #define MAYBE_DefaultPluginLoadTest DISABLED_DefaultPluginLoadTest
21 #else 22 #else
22 #define MAYBE_DefaultPluginLoadTest DefaultPluginLoadTest 23 #define MAYBE_DefaultPluginLoadTest DefaultPluginLoadTest
23 #endif 24 #endif
24 TEST_F(DefaultPluginUITest, MAYBE_DefaultPluginLoadTest) { 25 TEST_F(DefaultPluginUITest, MAYBE_DefaultPluginLoadTest) {
25 // Open page with default plugin. 26 // Open page with default plugin.
26 FilePath test_file(test_data_directory_); 27 FilePath test_file(test_data_directory_);
27 test_file = test_file.AppendASCII("default_plugin.html"); 28 test_file = test_file.AppendASCII("default_plugin.html");
28 NavigateToURL(net::FilePathToFileURL(test_file)); 29 NavigateToURL(net::FilePathToFileURL(test_file));
29 30
30 // Check that the default plugin was loaded. It executes a bit of javascript 31 // Check that the default plugin was loaded. It executes a bit of javascript
31 // in the HTML file which replaces the innerHTML of div |result| with "DONE". 32 // in the HTML file which replaces the innerHTML of div |result| with "DONE".
32 scoped_refptr<TabProxy> tab(GetActiveTab()); 33 scoped_refptr<TabProxy> tab(GetActiveTab());
33 std::wstring out; 34 string16 out;
34 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", 35 ASSERT_TRUE(tab->ExecuteAndExtractString(string16(),
35 L"domAutomationController.send(" 36 ASCIIToUTF16("domAutomationController.send("
36 L"document.getElementById('result').innerHTML)", &out)); 37 "document.getElementById('result').innerHTML)"), &out));
37 ASSERT_EQ(L"DONE", out); 38 ASSERT_EQ(ASCIIToUTF16("DONE"), out);
38 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698