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

Side by Side Diff: javatests/org/chromium/distiller/DomDistillerJsTestCase.java

Issue 1142323005: Make TableClassifierTest independent of browser window dimention (Closed) Base URL: git@github.com:chromium/dom-distiller.git@master
Patch Set: fix width for all tests Created 5 years, 6 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 | « build.xml ('k') | javatests/org/chromium/distiller/TableClassifierTest.java » ('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 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 package org.chromium.distiller; 5 package org.chromium.distiller;
6 6
7 import com.google.gwt.core.client.JsArray; 7 import com.google.gwt.core.client.JsArray;
8 import com.google.gwt.dom.client.Document; 8 import com.google.gwt.dom.client.Document;
9 import com.google.gwt.dom.client.Element; 9 import com.google.gwt.dom.client.Element;
10 import com.google.gwt.dom.client.Node; 10 import com.google.gwt.dom.client.Node;
(...skipping 20 matching lines...) Expand all
31 mRoot.removeAttribute(attrs.get(i).getNodeName()); 31 mRoot.removeAttribute(attrs.get(i).getNodeName());
32 } 32 }
33 NodeList<Node> children = mRoot.getChildNodes(); 33 NodeList<Node> children = mRoot.getChildNodes();
34 for (int i = children.getLength() - 1; i >= 0; i--) { 34 for (int i = children.getLength() - 1; i >= 0; i--) {
35 children.getItem(i).removeFromParent(); 35 children.getItem(i).removeFromParent();
36 } 36 }
37 mHead = Document.get().createElement("head"); 37 mHead = Document.get().createElement("head");
38 mRoot.appendChild(mHead); 38 mRoot.appendChild(mHead);
39 mBody = Document.get().createElement("body"); 39 mBody = Document.get().createElement("body");
40 mRoot.appendChild(mBody); 40 mRoot.appendChild(mBody);
41 // With this, the width of chrome window won't affect the layout.
42 mRoot.getStyle().setProperty("width", "800px");
41 } 43 }
42 } 44 }
OLDNEW
« no previous file with comments | « build.xml ('k') | javatests/org/chromium/distiller/TableClassifierTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698