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

Side by Side Diff: chrome/browser/history/multipart_uitest.cc

Issue 2280003: Use IPC to wait for download in DownloadTest. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Fix compile error. Created 10 years, 7 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
« no previous file with comments | « chrome/browser/download/save_page_uitest.cc ('k') | chrome/common/notification_type.h » ('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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "app/sql/connection.h" 7 #include "app/sql/connection.h"
8 #include "app/sql/statement.h" 8 #include "app/sql/statement.h"
9 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/automation/browser_proxy.h" 10 #include "chrome/test/automation/browser_proxy.h"
11 #include "net/url_request/url_request_unittest.h" 11 #include "net/url_request/url_request_unittest.h"
12 12
13 namespace { 13 namespace {
14 14
15 class MultipartResponseUITest : public UITest { 15 class MultipartResponseUITest : public UITest {
16 }; 16 };
17 17
18 #if defined(NDEBUG)
19 // http://code.google.com/p/chromium/issues/detail?id=37746 18 // http://code.google.com/p/chromium/issues/detail?id=37746
20 // Running this test only for release builds as it fails in debug test 19 // Running this test only for release builds as it fails in debug test
21 // runs 20 // runs
22 TEST_F(MultipartResponseUITest, SingleVisit) { 21 #if defined(NDEBUG)
22 #define MAYBE_SingleVisit SingleVisit
23 #else
24 #define MAYBE_SingleVisit DISABLED_SingleVisit
25 #endif
26
27 TEST_F(MultipartResponseUITest, MAYBE_SingleVisit) {
23 // Make sure that visiting a multipart/x-mixed-replace site only 28 // Make sure that visiting a multipart/x-mixed-replace site only
24 // creates one entry in the visits table. 29 // creates one entry in the visits table.
25 const wchar_t kDocRoot[] = L"chrome/test/data"; 30 const wchar_t kDocRoot[] = L"chrome/test/data";
26 scoped_refptr<HTTPTestServer> server = 31 scoped_refptr<HTTPTestServer> server =
27 HTTPTestServer::CreateServer(kDocRoot, NULL); 32 HTTPTestServer::CreateServer(kDocRoot, NULL);
28 ASSERT_TRUE(NULL != server.get()); 33 ASSERT_TRUE(NULL != server.get());
29 34
30 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); 35 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
31 ASSERT_TRUE(browser_proxy.get()); 36 ASSERT_TRUE(browser_proxy.get());
32 scoped_refptr<TabProxy> tab_proxy(browser_proxy->GetActiveTab()); 37 scoped_refptr<TabProxy> tab_proxy(browser_proxy->GetActiveTab());
(...skipping 16 matching lines...) Expand all
49 "SELECT COUNT(1) FROM visits, urls WHERE visits.url = urls.id" 54 "SELECT COUNT(1) FROM visits, urls WHERE visits.url = urls.id"
50 " AND urls.url LIKE 'http://localhost:%/multipart'"); 55 " AND urls.url LIKE 'http://localhost:%/multipart'");
51 { 56 {
52 sql::Statement statement(db.GetUniqueStatement(query.c_str())); 57 sql::Statement statement(db.GetUniqueStatement(query.c_str()));
53 EXPECT_TRUE(statement); 58 EXPECT_TRUE(statement);
54 EXPECT_TRUE(statement.Step()); 59 EXPECT_TRUE(statement.Step());
55 EXPECT_EQ(1, statement.ColumnInt(0)); 60 EXPECT_EQ(1, statement.ColumnInt(0));
56 } 61 }
57 db.Close(); 62 db.Close();
58 } 63 }
59 #endif
60 64
61 } // namespace 65 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_uitest.cc ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698