Permalink
Browse files

Prep HTML/JavaScript escape changes for pull

Removes brittle ui test
  • Loading branch information...
1 parent a8ecc98 commit aed32985d67a421605df570ad3291084425da030 @d2r d2r committed Feb 26, 2013
Showing with 0 additions and 52 deletions.
  1. +0 −52 test/clj/backtype/storm/ui_test.clj
@@ -1,52 +0,0 @@
-(ns backtype.storm.ui-test
- (:use [backtype.storm.ui core])
- (:use [clojure test])
- (:use [hiccup.core :only (html)])
-)
-
-(deftest test-javascript-escaped-in-action-buttons
- (let [expected-s "confirmAction('XX\\\"XX\\'XX\\\\XX\\/XX\\nXX', 'XX\\\"XX\\'XX\\\\XX\\/XX\\nXX', 'activate', false, 0)"
- malicious-js "XX\"XX'XX\\XX/XX
-XX"
- result (topology-action-button malicious-js malicious-js
- "Activate" "activate" false 0 true)
- onclick (:onclick (second result))]
-
- (is (= expected-s onclick)
- "Escapes quotes, slashes, back-slashes, and new-lines.")
- )
-)
-
-(deftest test-topology-link-escapes-content-html
- (let [topo-name "BOGUSTOPO"]
- (is (= (str "<a href=\"/topology/" topo-name "\">&lt;BLINK&gt;foobar</a>")
- (html (topology-link topo-name "<BLINK>foobar"))))
- )
-)
-
-(deftest test-component-link-escapes-content-html
- (let [topo-name "BOGUSTOPO"]
- (is (= (str "<a href=\"/topology/" topo-name "/component/%3CBLINK%3Ecomp-id\">&lt;BLINK&gt;comp-id</a>")
- (html (component-link topo-name "<BLINK>comp-id"))))
- )
-)
-
-; main-topology-summary-table
-; submit topo name like "<BLINK>foobar"
-; Load / and visually confirm the 'id' column does not blink for the topo.
-
-; topology-summary-table
-; submit topo name like "<BLINK>foobar"
-; Load / and visually confirm the 'id' column does not blink for the topo or the name
-
-; topology-summary-table
-; submit topo name like "<BLINK>foobar"
-; Load / and visually confirm the 'id' column does not blink for the topo or the name
-
-; component-page
-; recompile a topology (such as the ExclamationTopology from storm-starter) and hardcode bolt/spout names with '<blink>'
-; Load the bolt or spout component page and visually confirm the 'id' column does not blink the component name.
-
-; bolt-input-summary-table
-; recompile a topology (such as the ExclamationTopology from storm-starter) and hardcode bolt names with '<blink>'
-; A bolt component page and visually confirm the 'component' column of the Input stats does not blink the component name.

0 comments on commit aed3298

Please sign in to comment.