OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 ASSERT_TRUE(window->AppendTab(GURL("about:blank"))); | 187 ASSERT_TRUE(window->AppendTab(GURL("about:blank"))); |
188 int tab_count; | 188 int tab_count; |
189 ASSERT_TRUE(window->GetTabCount(&tab_count)); | 189 ASSERT_TRUE(window->GetTabCount(&tab_count)); |
190 ASSERT_EQ(original_tab_count + 1, tab_count); | 190 ASSERT_EQ(original_tab_count + 1, tab_count); |
191 | 191 |
192 int active_tab_index = -1; | 192 int active_tab_index = -1; |
193 ASSERT_TRUE(window->GetActiveTabIndex(&active_tab_index)); | 193 ASSERT_TRUE(window->GetActiveTabIndex(&active_tab_index)); |
194 ASSERT_EQ(tab_count - 1, active_tab_index); | 194 ASSERT_EQ(tab_count - 1, active_tab_index); |
195 ASSERT_NE(original_active_tab_index, active_tab_index); | 195 ASSERT_NE(original_active_tab_index, active_tab_index); |
196 | 196 |
197 std::wstring filename(test_data_directory_); | 197 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
198 file_util::AppendToPath(&filename, L"title2.html"); | 198 filename = filename.AppendASCII("title2.html"); |
199 ASSERT_TRUE(window->AppendTab(net::FilePathToFileURL(filename))); | 199 ASSERT_TRUE(window->AppendTab(net::FilePathToFileURL(filename))); |
200 | 200 |
201 int appended_tab_index; | 201 int appended_tab_index; |
202 // Append tab will also be active tab | 202 // Append tab will also be active tab |
203 ASSERT_TRUE(window->GetActiveTabIndex(&appended_tab_index)); | 203 ASSERT_TRUE(window->GetActiveTabIndex(&appended_tab_index)); |
204 | 204 |
205 scoped_ptr<TabProxy> tab(window->GetTab(appended_tab_index)); | 205 scoped_ptr<TabProxy> tab(window->GetTab(appended_tab_index)); |
206 ASSERT_TRUE(tab.get()); | 206 ASSERT_TRUE(tab.get()); |
207 std::wstring title; | 207 std::wstring title; |
208 ASSERT_TRUE(tab->GetTabTitle(&title)); | 208 ASSERT_TRUE(tab->GetTabTitle(&title)); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 255 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
256 ASSERT_TRUE(window.get()); | 256 ASSERT_TRUE(window.get()); |
257 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 257 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
258 ASSERT_TRUE(tab.get()); | 258 ASSERT_TRUE(tab.get()); |
259 | 259 |
260 std::wstring title; | 260 std::wstring title; |
261 ASSERT_TRUE(tab->GetTabTitle(&title)); | 261 ASSERT_TRUE(tab->GetTabTitle(&title)); |
262 // BUG [634097] : expected title should be "about:blank" | 262 // BUG [634097] : expected title should be "about:blank" |
263 ASSERT_STREQ(L"", title.c_str()); | 263 ASSERT_STREQ(L"", title.c_str()); |
264 | 264 |
265 std::wstring filename(test_data_directory_); | 265 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
266 file_util::AppendToPath(&filename, L"title2.html"); | 266 filename = filename.AppendASCII("title2.html"); |
267 | 267 |
268 tab->NavigateToURL(net::FilePathToFileURL(filename)); | 268 tab->NavigateToURL(net::FilePathToFileURL(filename)); |
269 ASSERT_TRUE(tab->GetTabTitle(&title)); | 269 ASSERT_TRUE(tab->GetTabTitle(&title)); |
270 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); | 270 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); |
271 | 271 |
272 // TODO(vibhor) : Add a test using testserver. | 272 // TODO(vibhor) : Add a test using testserver. |
273 } | 273 } |
274 | 274 |
275 // This test is disabled. See bug 794412 | 275 // This test is disabled. See bug 794412 |
276 TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout1) { | 276 TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout1) { |
277 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 277 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
278 ASSERT_TRUE(window.get()); | 278 ASSERT_TRUE(window.get()); |
279 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 279 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
280 ASSERT_TRUE(tab.get()); | 280 ASSERT_TRUE(tab.get()); |
281 | 281 |
282 std::wstring filename(test_data_directory_); | 282 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
283 file_util::AppendToPath(&filename, L"title2.html"); | 283 filename = filename.AppendASCII("title2.html"); |
284 | 284 |
285 bool is_timeout; | 285 bool is_timeout; |
286 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename), | 286 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename), |
287 10000, &is_timeout); | 287 10000, &is_timeout); |
288 ASSERT_FALSE(is_timeout); | 288 ASSERT_FALSE(is_timeout); |
289 | 289 |
290 std::wstring title; | 290 std::wstring title; |
291 ASSERT_TRUE(tab->GetTabTitle(&title)); | 291 ASSERT_TRUE(tab->GetTabTitle(&title)); |
292 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); | 292 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); |
293 | 293 |
294 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename), | 294 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename), |
295 1, &is_timeout); | 295 1, &is_timeout); |
296 ASSERT_TRUE(is_timeout); | 296 ASSERT_TRUE(is_timeout); |
297 | 297 |
298 Sleep(10); | 298 Sleep(10); |
299 } | 299 } |
300 | 300 |
301 // This test is disabled. See bug 794412. | 301 // This test is disabled. See bug 794412. |
302 TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout2) { | 302 TEST_F(AutomationProxyTest, DISABLED_NavigateToURLWithTimeout2) { |
303 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 303 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
304 ASSERT_TRUE(window.get()); | 304 ASSERT_TRUE(window.get()); |
305 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 305 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
306 tab.reset(window->GetTab(0)); | 306 tab.reset(window->GetTab(0)); |
307 ASSERT_TRUE(tab.get()); | 307 ASSERT_TRUE(tab.get()); |
308 | 308 |
309 std::wstring filename1(test_data_directory_); | 309 FilePath filename1(FilePath::FromWStringHack(test_data_directory_)); |
310 file_util::AppendToPath(&filename1, L"title1.html"); | 310 filename1 = filename1.AppendASCII("title1.html"); |
311 | 311 |
312 bool is_timeout; | 312 bool is_timeout; |
313 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename1), | 313 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename1), |
314 1, &is_timeout); | 314 1, &is_timeout); |
315 ASSERT_TRUE(is_timeout); | 315 ASSERT_TRUE(is_timeout); |
316 | 316 |
317 std::wstring filename2(test_data_directory_); | 317 FilePath filename2(FilePath::FromWStringHack(test_data_directory_)); |
318 file_util::AppendToPath(&filename2, L"title2.html"); | 318 filename2 = filename2.AppendASCII("title1.html"); |
319 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename2), | 319 tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename2), |
320 10000, &is_timeout); | 320 10000, &is_timeout); |
321 ASSERT_FALSE(is_timeout); | 321 ASSERT_FALSE(is_timeout); |
322 | 322 |
323 Sleep(10); | 323 Sleep(10); |
324 } | 324 } |
325 | 325 |
326 TEST_F(AutomationProxyTest, GoBackForward) { | 326 TEST_F(AutomationProxyTest, GoBackForward) { |
327 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 327 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
328 ASSERT_TRUE(window.get()); | 328 ASSERT_TRUE(window.get()); |
329 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 329 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
330 ASSERT_TRUE(tab.get()); | 330 ASSERT_TRUE(tab.get()); |
331 | 331 |
332 std::wstring title; | 332 std::wstring title; |
333 ASSERT_TRUE(tab->GetTabTitle(&title)); | 333 ASSERT_TRUE(tab->GetTabTitle(&title)); |
334 // BUG [634097] : expected title should be "about:blank" | 334 // BUG [634097] : expected title should be "about:blank" |
335 ASSERT_STREQ(L"", title.c_str()); | 335 ASSERT_STREQ(L"", title.c_str()); |
336 | 336 |
337 ASSERT_FALSE(tab->GoBack()); | 337 ASSERT_FALSE(tab->GoBack()); |
338 ASSERT_TRUE(tab->GetTabTitle(&title)); | 338 ASSERT_TRUE(tab->GetTabTitle(&title)); |
339 ASSERT_STREQ(L"", title.c_str()); | 339 ASSERT_STREQ(L"", title.c_str()); |
340 | 340 |
341 std::wstring filename(test_data_directory_); | 341 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
342 file_util::AppendToPath(&filename, L"title2.html"); | 342 filename = filename.AppendASCII("title2.html"); |
343 ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); | 343 ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); |
344 ASSERT_TRUE(tab->GetTabTitle(&title)); | 344 ASSERT_TRUE(tab->GetTabTitle(&title)); |
345 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); | 345 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); |
346 | 346 |
347 ASSERT_TRUE(tab->GoBack()); | 347 ASSERT_TRUE(tab->GoBack()); |
348 ASSERT_TRUE(tab->GetTabTitle(&title)); | 348 ASSERT_TRUE(tab->GetTabTitle(&title)); |
349 // BUG [634097] : expected title should be "about:blank" | 349 // BUG [634097] : expected title should be "about:blank" |
350 ASSERT_STREQ(L"", title.c_str()); | 350 ASSERT_STREQ(L"", title.c_str()); |
351 | 351 |
352 ASSERT_TRUE(tab->GoForward()); | 352 ASSERT_TRUE(tab->GoForward()); |
353 ASSERT_TRUE(tab->GetTabTitle(&title)); | 353 ASSERT_TRUE(tab->GetTabTitle(&title)); |
354 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); | 354 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); |
355 | 355 |
356 ASSERT_FALSE(tab->GoForward()); | 356 ASSERT_FALSE(tab->GoForward()); |
357 ASSERT_TRUE(tab->GetTabTitle(&title)); | 357 ASSERT_TRUE(tab->GetTabTitle(&title)); |
358 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); | 358 ASSERT_STREQ(L"Title Of Awesomeness", title.c_str()); |
359 } | 359 } |
360 | 360 |
361 TEST_F(AutomationProxyTest, GetCurrentURL) { | 361 TEST_F(AutomationProxyTest, GetCurrentURL) { |
362 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 362 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
363 ASSERT_TRUE(window.get()); | 363 ASSERT_TRUE(window.get()); |
364 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 364 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
365 ASSERT_TRUE(tab.get()); | 365 ASSERT_TRUE(tab.get()); |
366 GURL url; | 366 GURL url; |
367 ASSERT_TRUE(tab->GetCurrentURL(&url)); | 367 ASSERT_TRUE(tab->GetCurrentURL(&url)); |
368 ASSERT_STREQ("about:blank", url.spec().c_str()); | 368 ASSERT_STREQ("about:blank", url.spec().c_str()); |
369 | 369 |
370 std::wstring filename(test_data_directory_); | 370 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
371 file_util::AppendToPath(&filename, L"cookie1.html"); | 371 filename = filename.AppendASCII("cookie1.html"); |
372 GURL newurl = net::FilePathToFileURL(filename); | 372 GURL newurl = net::FilePathToFileURL(filename); |
373 ASSERT_TRUE(tab->NavigateToURL(newurl)); | 373 ASSERT_TRUE(tab->NavigateToURL(newurl)); |
374 ASSERT_TRUE(tab->GetCurrentURL(&url)); | 374 ASSERT_TRUE(tab->GetCurrentURL(&url)); |
375 // compare canonical urls... | 375 // compare canonical urls... |
376 ASSERT_STREQ(newurl.spec().c_str(), url.spec().c_str()); | 376 ASSERT_STREQ(newurl.spec().c_str(), url.spec().c_str()); |
377 } | 377 } |
378 | 378 |
379 class AutomationProxyTest2 : public AutomationProxyVisibleTest { | 379 class AutomationProxyTest2 : public AutomationProxyVisibleTest { |
380 protected: | 380 protected: |
381 AutomationProxyTest2() { | 381 AutomationProxyTest2() { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 ASSERT_TRUE(handle); | 467 ASSERT_TRUE(handle); |
468 } | 468 } |
469 | 469 |
470 TEST_F(AutomationProxyTest, NavigateToURLAsync) { | 470 TEST_F(AutomationProxyTest, NavigateToURLAsync) { |
471 AutomationProxy* automation_object = automation(); | 471 AutomationProxy* automation_object = automation(); |
472 scoped_ptr<BrowserProxy> window(automation_object->GetBrowserWindow(0)); | 472 scoped_ptr<BrowserProxy> window(automation_object->GetBrowserWindow(0)); |
473 ASSERT_TRUE(window.get()); | 473 ASSERT_TRUE(window.get()); |
474 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 474 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
475 ASSERT_TRUE(tab.get()); | 475 ASSERT_TRUE(tab.get()); |
476 | 476 |
477 std::wstring filename(test_data_directory_); | 477 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
478 file_util::AppendToPath(&filename, L"cookie1.html"); | 478 filename = filename.AppendASCII("cookie1.html"); |
479 GURL newurl = net::FilePathToFileURL(filename); | 479 GURL newurl = net::FilePathToFileURL(filename); |
480 | 480 |
481 ASSERT_TRUE(tab->NavigateToURLAsync(newurl)); | 481 ASSERT_TRUE(tab->NavigateToURLAsync(newurl)); |
482 std::string value = WaitUntilCookieNonEmpty(tab.get(), newurl, "foo", 250, | 482 std::string value = WaitUntilCookieNonEmpty(tab.get(), newurl, "foo", 250, |
483 action_max_timeout_ms()); | 483 action_max_timeout_ms()); |
484 ASSERT_STREQ("baz", value.c_str()); | 484 ASSERT_STREQ("baz", value.c_str()); |
485 } | 485 } |
486 | 486 |
487 TEST_F(AutomationProxyTest, AcceleratorNewTab) { | 487 TEST_F(AutomationProxyTest, AcceleratorNewTab) { |
488 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 488 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 } | 650 } |
651 | 651 |
652 TEST_F(AutomationProxyTest, DISABLED_ConstrainedWindowTest) { | 652 TEST_F(AutomationProxyTest, DISABLED_ConstrainedWindowTest) { |
653 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 653 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
654 ASSERT_TRUE(window.get()); | 654 ASSERT_TRUE(window.get()); |
655 | 655 |
656 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 656 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
657 tab.reset(window->GetTab(0)); | 657 tab.reset(window->GetTab(0)); |
658 ASSERT_TRUE(tab.get()); | 658 ASSERT_TRUE(tab.get()); |
659 | 659 |
660 std::wstring filename(test_data_directory_); | 660 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
661 file_util::AppendToPath(&filename, L"constrained_files"); | 661 filename = filename.AppendASCII("constrained_files"); |
662 file_util::AppendToPath(&filename, L"constrained_window.html"); | 662 filename = filename.AppendASCII("constrained_window.html"); |
663 | 663 |
664 ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); | 664 ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); |
665 | 665 |
666 int count; | 666 int count; |
667 ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); | 667 ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); |
668 | 668 |
669 ASSERT_EQ(2, count); | 669 ASSERT_EQ(2, count); |
670 | 670 |
671 ConstrainedWindowProxy* cwindow = tab->GetConstrainedWindow(0); | 671 ConstrainedWindowProxy* cwindow = tab->GetConstrainedWindow(0); |
672 ASSERT_TRUE(cwindow); | 672 ASSERT_TRUE(cwindow); |
(...skipping 18 matching lines...) Expand all Loading... |
691 } | 691 } |
692 | 692 |
693 TEST_F(AutomationProxyTest, CantEscapeByOnloadMoveto) { | 693 TEST_F(AutomationProxyTest, CantEscapeByOnloadMoveto) { |
694 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 694 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
695 ASSERT_TRUE(window.get()); | 695 ASSERT_TRUE(window.get()); |
696 | 696 |
697 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 697 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
698 tab.reset(window->GetTab(0)); | 698 tab.reset(window->GetTab(0)); |
699 ASSERT_TRUE(tab.get()); | 699 ASSERT_TRUE(tab.get()); |
700 | 700 |
701 std::wstring filename(test_data_directory_); | 701 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
702 file_util::AppendToPath(&filename, L"constrained_files"); | 702 filename = filename.AppendASCII("constrained_files"); |
703 file_util::AppendToPath(&filename, L"constrained_window_onload_moveto.html"); | 703 filename = filename.AppendASCII("constrained_window_onload_moveto.html"); |
704 | 704 |
705 ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); | 705 ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); |
706 | 706 |
707 int count; | 707 int count; |
708 ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); | 708 ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); |
709 | 709 |
710 ASSERT_EQ(1, count); | 710 ASSERT_EQ(1, count); |
711 | 711 |
712 ConstrainedWindowProxy* cwindow = tab->GetConstrainedWindow(0); | 712 ConstrainedWindowProxy* cwindow = tab->GetConstrainedWindow(0); |
713 ASSERT_TRUE(cwindow); | 713 ASSERT_TRUE(cwindow); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 } | 1094 } |
1095 }; | 1095 }; |
1096 | 1096 |
1097 TEST_F(AutomationProxyTest5, TestLifetimeOfDomAutomationController) { | 1097 TEST_F(AutomationProxyTest5, TestLifetimeOfDomAutomationController) { |
1098 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 1098 scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
1099 ASSERT_TRUE(window.get()); | 1099 ASSERT_TRUE(window.get()); |
1100 | 1100 |
1101 scoped_ptr<TabProxy> tab(window->GetTab(0)); | 1101 scoped_ptr<TabProxy> tab(window->GetTab(0)); |
1102 ASSERT_TRUE(tab.get()); | 1102 ASSERT_TRUE(tab.get()); |
1103 | 1103 |
1104 std::wstring filename(test_data_directory_); | 1104 FilePath filename(FilePath::FromWStringHack(test_data_directory_)); |
1105 file_util::AppendToPath(&filename, L"dom_automation_test_with_popup.html"); | 1105 filename = filename.AppendASCII("dom_automation_test_with_popup.html"); |
1106 | 1106 |
1107 tab->NavigateToURL(net::FilePathToFileURL(filename)); | 1107 tab->NavigateToURL(net::FilePathToFileURL(filename)); |
1108 | 1108 |
1109 // Allow some time for the popup to show up and close. | 1109 // Allow some time for the popup to show up and close. |
1110 Sleep(2000); | 1110 Sleep(2000); |
1111 | 1111 |
1112 std::wstring expected(L"string"); | 1112 std::wstring expected(L"string"); |
1113 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); | 1113 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); |
1114 std::wstring actual; | 1114 std::wstring actual; |
1115 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); | 1115 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); |
1116 ASSERT_STREQ(expected.c_str(), actual.c_str()); | 1116 ASSERT_STREQ(expected.c_str(), actual.c_str()); |
1117 } | 1117 } |
OLD | NEW |