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

Side by Side Diff: chrome/test/ui/npapi_uitest.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « chrome/test/sync/engine/test_id_factory.h ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 // windows headers 8 // windows headers
9 #include <comutil.h> 9 #include <comutil.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
11 #include <shlobj.h> 11 #include <shlobj.h>
12 #include <windows.h> 12 #include <windows.h>
13 #endif 13 #endif
14 14
15 // runtime headers 15 // runtime headers
16 #include <memory.h> 16 #include <memory.h>
17 #include <stdlib.h> 17 #include <stdlib.h>
18 #include <string.h> 18 #include <string.h>
19 19
20 #include <ostream> 20 #include <ostream>
21 21
22 #include "base/file_path.h" 22 #include "base/file_path.h"
23 #include "base/keyboard_codes.h" 23 #include "base/keyboard_codes.h"
24 #include "base/string_number_conversions.h"
24 #include "chrome/browser/net/url_request_mock_http_job.h" 25 #include "chrome/browser/net/url_request_mock_http_job.h"
25 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
26 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
27 #include "chrome/test/automation/browser_proxy.h" 28 #include "chrome/test/automation/browser_proxy.h"
28 #include "chrome/test/automation/tab_proxy.h" 29 #include "chrome/test/automation/tab_proxy.h"
29 #include "chrome/test/automation/window_proxy.h" 30 #include "chrome/test/automation/window_proxy.h"
30 #include "chrome/test/ui/npapi_test_helper.h" 31 #include "chrome/test/ui/npapi_test_helper.h"
31 #include "chrome/test/ui_test_utils.h" 32 #include "chrome/test/ui_test_utils.h"
32 33
33 using npapi_test::kTestCompleteCookie; 34 using npapi_test::kTestCompleteCookie;
(...skipping 13 matching lines...) Expand all
47 // Test invoking many plugins within a single page. 48 // Test invoking many plugins within a single page.
48 // Test still flaky under valgrind 49 // Test still flaky under valgrind
49 // http://crbug.com/28372, http://crbug.com/45561 50 // http://crbug.com/28372, http://crbug.com/45561
50 TEST_F(NPAPITester, FLAKY_ManyPlugins) { 51 TEST_F(NPAPITester, FLAKY_ManyPlugins) {
51 const FilePath test_case(FILE_PATH_LITERAL("many_plugins.html")); 52 const FilePath test_case(FILE_PATH_LITERAL("many_plugins.html"));
52 GURL url(ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case)); 53 GURL url(ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case));
53 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); 54 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
54 55
55 for (int i = 1; i <= 15; i++) { 56 for (int i = 1; i <= 15; i++) {
56 SCOPED_TRACE(StringPrintf("Waiting for plugin #%d", i)); 57 SCOPED_TRACE(StringPrintf("Waiting for plugin #%d", i));
57 ASSERT_NO_FATAL_FAILURE(WaitForFinish("arguments", IntToString(i), 58 ASSERT_NO_FATAL_FAILURE(WaitForFinish("arguments", base::IntToString(i),
58 url, kTestCompleteCookie, 59 url, kTestCompleteCookie,
59 kTestCompleteSuccess, 60 kTestCompleteSuccess,
60 action_max_timeout_ms())); 61 action_max_timeout_ms()));
61 } 62 }
62 } 63 }
63 64
64 // Test various calls to GetURL from a plugin. 65 // Test various calls to GetURL from a plugin.
65 TEST_F(NPAPITester, GetURL) { 66 TEST_F(NPAPITester, GetURL) {
66 const FilePath test_case(FILE_PATH_LITERAL("geturl.html")); 67 const FilePath test_case(FILE_PATH_LITERAL("geturl.html"));
67 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); 68 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case);
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 FilePath(FILE_PATH_LITERAL("npapi/convert_point.html")))); 371 FilePath(FILE_PATH_LITERAL("npapi/convert_point.html"))));
371 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); 372 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
372 373
373 // TODO(stuartmorgan): When the automation system supports sending clicks, 374 // TODO(stuartmorgan): When the automation system supports sending clicks,
374 // change the test to trigger on mouse-down rather than window focus. 375 // change the test to trigger on mouse-down rather than window focus.
375 ASSERT_TRUE(browser->BringToFront()); 376 ASSERT_TRUE(browser->BringToFront());
376 WaitForFinish("convert_point", "1", url, kTestCompleteCookie, 377 WaitForFinish("convert_point", "1", url, kTestCompleteCookie,
377 kTestCompleteSuccess, action_max_timeout_ms()); 378 kTestCompleteSuccess, action_max_timeout_ms());
378 } 379 }
379 #endif 380 #endif
OLDNEW
« no previous file with comments | « chrome/test/sync/engine/test_id_factory.h ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698