summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/dom_ui_unittest.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:31:25 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:31:25 +0000
commit156ed27bc42a66a694e243f3ecb0ad80f0c83351 (patch)
tree999d33767f2c2a2b41a97daa2c1ea65a7045f10a /chrome/browser/dom_ui/dom_ui_unittest.cc
parenta1dc714c599af4971dfe74a71c73a2be0ff3033b (diff)
downloadchromium_src-156ed27bc42a66a694e243f3ecb0ad80f0c83351.zip
chromium_src-156ed27bc42a66a694e243f3ecb0ad80f0c83351.tar.gz
chromium_src-156ed27bc42a66a694e243f3ecb0ad80f0c83351.tar.bz2
Take 2 at moving NTP CSS resources into the NTP resource cache.
Moving the HTML to the cache saved 8ms on New Tab Warm on Windows, maybe we can shave a few more ms off by moving the CSS. The last change had a regression on the mac new tab perf, so I suspect it's the extra round trip to the UI thread when trying to load the CSS (the UI thread is probably just busy at that time). Instead, I'm moving the generation of the CSS to the time the object is constructed, rather than when the resource is requested. This is like the code before, except sometimes we'll hit the cache. BUG=26228 Review URL: http://codereview.chromium.org/427003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/dom_ui_unittest.cc')
-rw-r--r--chrome/browser/dom_ui/dom_ui_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_unittest.cc b/chrome/browser/dom_ui/dom_ui_unittest.cc
index 712a2df..81df016 100644
--- a/chrome/browser/dom_ui/dom_ui_unittest.cc
+++ b/chrome/browser/dom_ui/dom_ui_unittest.cc
@@ -9,7 +9,7 @@
class DOMUITest : public RenderViewHostTestHarness {
public:
- DOMUITest() {}
+ DOMUITest() : ui_thread_(ChromeThread::UI, MessageLoop::current()) {}
// Tests navigating with a DOM UI from a fresh (nothing pending or committed)
// state, through pending, committed, then another navigation. The first page
@@ -75,6 +75,8 @@ class DOMUITest : public RenderViewHostTestHarness {
}
private:
+ ChromeThread ui_thread_;
+
DISALLOW_COPY_AND_ASSIGN(DOMUITest);
};