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

Issue 8341027: Fix client/html_tests so they use the new framework. (Closed)

Created:
9 years, 2 months ago by nweiz
Modified:
9 years, 1 month ago
Reviewers:
Anton Muhin, Jacob
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix client/html_tests so they use the new framework. TBR=jacobr Committed: https://code.google.com/p/dart/source/detail?r=707

Patch Set 1 #

Total comments: 18
Unified diffs Side-by-side diffs Delta from patch set Stats (+302 lines, -253 lines) Patch
M client/html/src/CSSStyleDeclaration.dart View 1 chunk +5 lines, -1 line 0 comments Download
M client/html/src/CSSStyleDeclarationWrappingImplementation.dart View 1 chunk +10 lines, -0 lines 2 comments Download
M client/html/src/DocumentFragmentWrappingImplementation.dart View 1 chunk +3 lines, -9 lines 6 comments Download
M client/tests/client/client.status View 1 chunk +0 lines, -1 line 0 comments Download
M client/tests/client/html/CSSStyleDeclarationTests.dart View 2 chunks +36 lines, -45 lines 8 comments Download
M client/tests/client/html/DocumentFragmentTests.dart View 4 chunks +246 lines, -195 lines 2 comments Download
M client/tests/client/html/html_tests.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
nweiz
9 years, 2 months ago (2011-10-25 18:33:48 UTC) #1
Jacob
http://codereview.chromium.org/8341027/diff/1/client/html/src/CSSStyleDeclarationWrappingImplementation.dart File client/html/src/CSSStyleDeclarationWrappingImplementation.dart (right): http://codereview.chromium.org/8341027/diff/1/client/html/src/CSSStyleDeclarationWrappingImplementation.dart#newcode25 client/html/src/CSSStyleDeclarationWrappingImplementation.dart:25: return new CSSStyleDeclarationWrappingImplementation.css(""); "" --> '' http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart File client/html/src/DocumentFragmentWrappingImplementation.dart ...
9 years, 2 months ago (2011-10-25 23:45:51 UTC) #2
nweiz
http://codereview.chromium.org/8341027/diff/1/client/html/src/CSSStyleDeclarationWrappingImplementation.dart File client/html/src/CSSStyleDeclarationWrappingImplementation.dart (right): http://codereview.chromium.org/8341027/diff/1/client/html/src/CSSStyleDeclarationWrappingImplementation.dart#newcode25 client/html/src/CSSStyleDeclarationWrappingImplementation.dart:25: return new CSSStyleDeclarationWrappingImplementation.css(""); On 2011/10/25 23:45:51, jacobr wrote: > ...
9 years, 2 months ago (2011-10-26 00:27:36 UTC) #3
Jacob
http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart File client/html/src/DocumentFragmentWrappingImplementation.dart (right): http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart#newcode112 client/html/src/DocumentFragmentWrappingImplementation.dart:112: : super._wrap(dom.document.createElement('div').style) {} On 2011/10/26 00:27:37, nweiz wrote: > ...
9 years, 1 month ago (2011-10-26 01:03:13 UTC) #4
Anton Muhin
http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart File client/html/src/DocumentFragmentWrappingImplementation.dart (right): http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart#newcode112 client/html/src/DocumentFragmentWrappingImplementation.dart:112: : super._wrap(dom.document.createElement('div').style) {} Why it's needed? I would really ...
9 years, 1 month ago (2011-10-26 13:24:05 UTC) #5
nweiz
http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart File client/html/src/DocumentFragmentWrappingImplementation.dart (right): http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmentWrappingImplementation.dart#newcode112 client/html/src/DocumentFragmentWrappingImplementation.dart:112: : super._wrap(dom.document.createElement('div').style) {} On 2011/10/26 13:24:05, antonmuhin wrote: > ...
9 years, 1 month ago (2011-10-26 17:30:53 UTC) #6
Jacob
9 years, 1 month ago (2011-10-27 01:03:44 UTC) #7
Also, I should have noticed this in the previous review, but:
DocumentFragmentWrappingImplementation needs to cache the computed
EmptyStyleDeclaration so that
myElement.style === myElement.style

http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmen...
File client/html/src/DocumentFragmentWrappingImplementation.dart (right):

http://codereview.chromium.org/8341027/diff/1/client/html/src/DocumentFragmen...
client/html/src/DocumentFragmentWrappingImplementation.dart:112: :
super._wrap(dom.document.createElement('div').style) {}
On 2011/10/26 17:30:53, nweiz wrote:
> On 2011/10/26 13:24:05, antonmuhin wrote:
> > Why it's needed?  I would really prefer not to have anything like that.
> > 
> > On 2011/10/26 01:03:13, jacobr wrote:
> > > On 2011/10/26 00:27:37, nweiz wrote:
> > > > On 2011/10/25 23:45:51, jacobr wrote:
> > > > > wouldn't 
> > > > > super._wrap(null);
> > > > > 
> > > > > be sufficient?
> > > > > 
> > > > > also, omit {} for empty constructor bodies.
> > > > 
> > > > DOMWrapperBase assumes _ptr is non-null.
> > > 
> > > I'd suggest adding an alternate 
> > > _empty()
> > > constructor  to DOMWrapperBase.
> > > which sets _ptr to null.
> > 
> 
> I think it's useful to have this constructor wrap an empty style declaration
> anyway; that was if new accessors are added EmptyStyleDeclaration doesn't
break.

I disagree with this reasoning because if the dummy style declaration created
here is ever used to set a property value (due to some hypothetical new
CSSStyleDeclaration method) then the behavior desired for this class will be
broken in surprising ways as now it would be possible to actually set styles
even though this class is supposed to be frozen.

Please create a new CL that fixes this issue.

Powered by Google App Engine
This is Rietveld 408576698