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

Unified Diff: LayoutTests/fast/frames/resources/frame-programmatic-resize.js

Issue 427563002: Remove HTMLFrameElement.width/height (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix tests Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/frames/resources/frame-programmatic-resize.js
diff --git a/LayoutTests/fast/frames/resources/frame-programmatic-resize.js b/LayoutTests/fast/frames/resources/frame-programmatic-resize.js
index fc023194946f41dfb8867dac9f50c7a7ff04fa6a..e762ab0fec6721ad3d43692e2f4e123cb55b2b21 100644
--- a/LayoutTests/fast/frames/resources/frame-programmatic-resize.js
+++ b/LayoutTests/fast/frames/resources/frame-programmatic-resize.js
@@ -24,7 +24,7 @@ function shouldDisallowFrameResize()
function shouldDisallowFrameResizeAfterProcessingFrame(processFrameFunction)
{
- var expectedWidth = _testFrame.width;
+ var expectedWidth = _testFrame.getBoundingClientRect().width;
processFrameFunction(_testFrame);
resizeTestFrameBy(deltaWidth());
checkTestFrameWidthEquals(expectedWidth);
@@ -32,7 +32,7 @@ function shouldDisallowFrameResizeAfterProcessingFrame(processFrameFunction)
function shouldAllowFrameResizeAfterProcessingFrame(processFrameFunction)
{
- var expectedWidth = _testFrame.width + deltaWidth();
+ var expectedWidth = _testFrame.getBoundingClientRect().width + deltaWidth();
processFrameFunction(_testFrame);
resizeTestFrameBy(deltaWidth());
checkTestFrameWidthEquals(expectedWidth);
@@ -40,10 +40,10 @@ function shouldAllowFrameResizeAfterProcessingFrame(processFrameFunction)
function checkTestFrameWidthEquals(expectedWidth)
{
- if (_testFrame.width === expectedWidth)
- log('PASS document.getElementById("' + _testFrameId + '").width is ' + expectedWidth);
+ if (_testFrame.getBoundingClientRect().width === expectedWidth)
+ log('PASS document.getElementById("' + _testFrameId + '").getBoundingClientRect().width is ' + expectedWidth);
else
- log('FAIL document.getElementById("' + _testFrameId + '").width should be ' + expectedWidth + '. Was ' + _testFrame.width + '.');
+ log('FAIL document.getElementById("' + _testFrameId + '").getBoundingClientRect().width should be ' + expectedWidth + '. Was ' + _testFrame.getBoundingClientRect().width + '.');
}
function resizeTestFrameBy(deltaWidthInPixels)
« no previous file with comments | « LayoutTests/fast/frames/frames-with-frameborder-zero-can-be-resized.html ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698