Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/firebug/firebug.git

  • Loading branch information...
commit 0c933c8df098d3f6d8df00e13d237f736c575511 2 parents ffb3690 + 16e56c0
Sebastian Zartner SebastianZ authored
41 tests/content/css/5461/issue5461.html
View
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Issue 5461: When copying selected parts from Style side panel don't copy source link or inherited styles header</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
+ <style type="text/css">
+ #element {
+ width: 100px;
+ height: 100px;
+ background: #8C8CFF -moz-linear-gradient(135deg, #788CFF, #B4C8FF);
+ }
+ </style>
+ </head>
+ <body>
+ <header>
+ <h1><a href="http://code.google.com/p/fbug/issues/detail?id=5461">Issue 5461</a>: When copying selected parts from Style side panel don't copy source link or inherited styles header</h1>
+ </header>
+ <div>
+ <section id="content">
+ <div id="element"></div>
+ </section>
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Open Firebug</li>
+ <li>Switch to the <em>HTML</em> panel and there to the <em>Style</em> side panel</li>
+ <li>Inspect the blue <code>&lt;div&gt;</code> (<code>#element</code>) above</li>
+ <li>Mark everything inside the <em>Style</em> side panel via <code class="key">Ctrl/&#8984;+A</code></li>
+ <li>Copy the selection to the clipboard via Ctrl/&#8984;+C</li>
+ <li>Paste the content of the clipboard to a text editor</li>
+ </ol>
+ <h3>Expected result</h3>
+ <ul>
+ <li>The copied contents shouldn't contain source links or inherited styles headers</li>
+ </ul>
+ </section>
+ <footer>Sebastian Zartner, sebastianzartner@gmx.de</footer>
+ </div>
+ </body>
+</html>
42 tests/content/css/5461/issue5461.js
View
@@ -0,0 +1,42 @@
+function runTest()
+{
+ FBTest.sysout("issue5461.START");
+
+ FBTest.openNewTab(basePath + "css/5461/issue5461.html", function(win)
+ {
+ FBTest.openFirebug();
+ FBTest.selectPanel("html");
+
+ FBTest.selectElementInHtmlPanel("element", function(node)
+ {
+ var panel = FBTest.selectSidePanel("css");
+
+ FBTest.synthesizeMouse(panel.panelNode);
+ FBTest.sendShortcut("a", {ctrlKey: true});
+
+ // Reset clipboard content
+ FBTest.clearClipboard();
+ var expected = new RegExp("#element\\s+\\{[\\r\\n]{1,2}"+
+ "\\s+background:\\s+-moz-linear-gradient\\(135deg, #788CFF, #B4C8FF\\) repeat "+
+ "scroll 0 0 #8C8CFF;[\\r\\n]{1,2}"+
+ "\\s+height:\\s+100px;[\\r\\n]{1,2}"+
+ "\\s+width:\\s+100px;[\\r\\n]{1,2}"+
+ "\\}[\\r\\n]{1,2}"+
+ "\\*\\s+\{[\\r\\n]{1,2}"+
+ "\\s+position: relative;[\\r\\n]{1,2}"+
+ "\\}[\\r\\n]{1,2}"+
+ "body\\s+\\\{[\\r\\n]{1,2}"+
+ "\\s+font-family:\\s+\\\"Trebuchet MS\\\",Helvetica,sans-serif;[\\r\\n]{1,2}"+
+ "\\s+font-size:\\s+0.9em;[\\r\\n]{1,2}"+
+ "\\}");
+ FBTest.waitForClipboard(expected, function(cssDecl)
+ {
+ FBTest.compare(expected, cssDecl,
+ "CSS declaration must be properly copied into the clipboard");
+ FBTest.testDone("issue5461.DONE");
+ });
+
+ FBTest.sendShortcut("c", {ctrlKey: true});
+ });
+ });
+}
1  tests/content/firebug.html
View
@@ -199,6 +199,7 @@
{group: "css", uri: "css/5277/issue5277.js", desc: "Display @import rule media queries and allow editing them", testPage: "css/5277/issue5277.html"},
{group: "css", uri: "css/5412/issue5412.js", desc: "Auto-completion for CSS selectors", testPage: "css/5412/issue5412.html"},
{group: "css", uri: "css/5430/issue5430.js", desc: "Show @namespace rules inside CSS panel", testPage: "css/5430/issue5430.html"},
+ {group: "css", uri: "css/5461/issue5461.js", desc: "When copying selected parts from Style side panel don't copy source link or inherited styles header", testPage: "css/5461/issue5461.html"},
{group: "css/computed", uri: "css/computed/3207/issue3207.js", desc: "CSS properties in the \"Computed\" tab are not updated correctly", testPage: "css/computed/3207/issue3207.html"},
{group: "css/computed", uri: "css/computed/5449/issue5449.js", desc: "Show infotips in Computed side panel", testPage: "css/computed/5449/issue5449.html"},
{group: "css/computed", uri: "css/computed/5451/issue5451.js", desc: "Persist scrolling in Computed side panel", testPage: "css/computed/5451/issue5451.html"},
Please sign in to comment.
Something went wrong with that request. Please try again.