OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "components/translate/ios/browser/translate_controller.h" | 5 #import "components/translate/ios/browser/translate_controller.h" |
6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" |
7 #include "base/values.h" | 8 #include "base/values.h" |
8 #import "components/translate/ios/browser/js_translate_manager.h" | 9 #import "components/translate/ios/browser/js_translate_manager.h" |
9 #include "ios/web/public/test/test_web_state.h" | 10 #include "ios/web/public/test/test_web_state.h" |
10 #include "testing/platform_test.h" | 11 #include "testing/platform_test.h" |
11 #import "third_party/ocmock/OCMock/OCMock.h" | 12 #import "third_party/ocmock/OCMock/OCMock.h" |
12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
13 | 14 |
14 namespace translate { | 15 namespace translate { |
15 | 16 |
16 class TranslateControllerTest : public PlatformTest, | 17 class TranslateControllerTest : public PlatformTest, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 command.SetString("command", "translate.status"); | 134 command.SetString("command", "translate.status"); |
134 command.SetBoolean("success", false); | 135 command.SetBoolean("success", false); |
135 EXPECT_TRUE(translate_controller_->OnJavascriptCommandReceived( | 136 EXPECT_TRUE(translate_controller_->OnJavascriptCommandReceived( |
136 command, GURL("http://google.com"), false)); | 137 command, GURL("http://google.com"), false)); |
137 EXPECT_FALSE(on_script_ready_called_); | 138 EXPECT_FALSE(on_script_ready_called_); |
138 EXPECT_TRUE(on_translate_complete_called_); | 139 EXPECT_TRUE(on_translate_complete_called_); |
139 EXPECT_FALSE(success_); | 140 EXPECT_FALSE(success_); |
140 } | 141 } |
141 | 142 |
142 } // namespace translate | 143 } // namespace translate |
OLD | NEW |