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

Side by Side Diff: chrome/renderer/translate/translate_script_browsertest.cc

Issue 231793004: Update a few more references to WebFrame to use WebLocalFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/test/base/chrome_render_view_test.h" 7 #include "chrome/test/base/chrome_render_view_test.h"
8 #include "components/translate/core/common/translate_errors.h" 8 #include "components/translate/core/common/translate_errors.h"
9 #include "grit/component_resources.h" 9 #include "grit/component_resources.h"
10 #include "third_party/WebKit/public/web/WebFrame.h" 10 #include "third_party/WebKit/public/web/WebLocalFrame.h"
11 #include "third_party/WebKit/public/web/WebScriptSource.h" 11 #include "third_party/WebKit/public/web/WebScriptSource.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "v8/include/v8.h" 13 #include "v8/include/v8.h"
14 14
15 using blink::WebFrame;
16 using blink::WebScriptSource; 15 using blink::WebScriptSource;
17 16
18 namespace { 17 namespace {
19 18
20 // JavaScript code to set runtime test flags. 19 // JavaScript code to set runtime test flags.
21 const char kThrowInitializationError[] = "throwInitializationError = true"; 20 const char kThrowInitializationError[] = "throwInitializationError = true";
22 const char kThrowUnexpectedScriptError[] = "throwUnexpectedScriptError = true"; 21 const char kThrowUnexpectedScriptError[] = "throwUnexpectedScriptError = true";
23 const char kCallbackReturnBooleanError[] = "callbackReturnBooleanError = true"; 22 const char kCallbackReturnBooleanError[] = "callbackReturnBooleanError = true";
24 const char kCallbackReturnNumberError[] = "callbackReturnNumberError = true"; 23 const char kCallbackReturnNumberError[] = "callbackReturnNumberError = true";
25 const char kSetCallbackErrorCode[] = "callbackErrorCode = "; 24 const char kSetCallbackErrorCode[] = "callbackErrorCode = ";
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 EXPECT_FALSE(GetError()); 230 EXPECT_FALSE(GetError());
232 EXPECT_EQ(TranslateErrors::NONE, GetErrorCode()); 231 EXPECT_EQ(TranslateErrors::NONE, GetErrorCode());
233 232
234 ExecuteScript(kTranslate); 233 ExecuteScript(kTranslate);
235 234
236 EXPECT_TRUE(GetError()); 235 EXPECT_TRUE(GetError());
237 EXPECT_EQ(TranslateErrors::UNSUPPORTED_LANGUAGE, GetErrorCode()); 236 EXPECT_EQ(TranslateErrors::UNSUPPORTED_LANGUAGE, GetErrorCode());
238 } 237 }
239 238
240 // TODO(toyoshim): Add test for onLoadJavaScript. 239 // TODO(toyoshim): Add test for onLoadJavaScript.
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698